# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=libjwt
pkgver=1.17.0
pkgrel=0
pkgdesc="JWT C Library"
url="https://github.com/benmcollins/libjwt"
arch="all"
license="MPL-2.0"
makedepends="
	autoconf
	automake
	jansson-dev
	libtool
	openssl-dev
	"
checkdepends="check-dev"
subpackages="$pkgname-static $pkgname-dev"
source="$pkgname-$pkgver.tar.gz::https://github.com/benmcollins/libjwt/archive/refs/tags/v$pkgver.tar.gz"

prepare() {
	default_prepare

	autoreconf -fvi
}

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--without-examples
	make
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="
4d3fd4e12e13549b3cd924394ba6b786525a22e85cf09129e1cfa62170900a36bfa4e58da5805eaa1b8ee20f57b6a9c6f52f51f342e923ad9bbbf7770b7761e1  libjwt-1.17.0.tar.gz
"
